import 'package:chathouse/constant/my_color.dart';
import 'package:chathouse/util/base_utils.dart';
import 'package:chathouse/util/font_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class FormWidgets {
  static Widget getTextButton(String text, Color bg,
      {bool enable = true, Widget? icon}) {
    return Container(
      padding: EdgeInsets.only(top: 8.w, bottom: 8.w),
      decoration: BoxDecoration(
          color: enable ? bg : MyColors.gary_165165165,
          borderRadius: BorderRadius.circular(100.w)),
      alignment: Alignment.center,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Text(
            text,
            style: getTextStyle(18.sp,
                fontType: FontType.DEFAULT, color: Colors.white),
          ),
          icon ?? Container()
        ],
      ),
    );
  }
}

class KeyValueBean {
  String value;
  String name;
  KeyValueBean(this.value, this.name);
}


